home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / tas412.zip / PERFCHK.TAS < prev    next >
Text File  |  1991-06-20  |  1KB  |  31 lines

  1.  { PERFCHK.TAS  ( Author Martin Moore)
  2.   Script to print out the performance of certain stocks since a particular
  3.   day. To add a ticker and date to the list of stocks to be tracked, just
  4.   put a line like this in:
  5.     if TICKER = 'tickername' then find_date = yyddmm.0 else
  6.   where 'tickername' is the stock ticker surrounded by quotes and
  7.         'yymmdd' is the year, month and day. Be sure to include the 
  8.         ".0" after the date (see documentation on size of INTEGERs
  9.  }                        
  10.   if FIRST_TICKER then
  11.   BEGIN
  12.   writeln('          CURRENT  PERCENT  POINTS     SINCE');
  13.   writeln('TICKER     CLOSE   CHANGE   CHANGE     DATE');
  14.   END;
  15.  
  16.  if TICKER = 'AMGN' then find_date = 910502.0 else
  17.  if TICKER = 'IBM'  then find_date = 900802.0 else 
  18.  if TICKER = 'AAPL' then find_date = 900802.0 else
  19.  RETURN;        { no matching stock ticker..just return}
  20.  date_found_sw = 0;  { indicate date not yet found}
  21.  i = 0;              { search backwards for date match}
  22.  :DATE_LOOKUP
  23.  if dates[i] = find_date then goto DATE_FOUND;
  24.  i = i - 1;   { backup one day's index}
  25.  if i = -quote_count then return;  { date not found..should not happen, Ken!}
  26.  goto DATE_LOOKUP;        { go back and check prior day}
  27.  :DATE_FOUND
  28.   writeln(TICKER,C,ROC(C,-i,'%'),'% ',ROC(C,-i,'$'),'   ',
  29.         datestr(dates[i]));
  30.  
  31.